import 'package:dk_flutter_base/dk_ui.dart';
import 'package:flutter/foundation.dart';
import 'dart:async';

/// picker localizations
class DkPickerLocalizationsDelegate
    extends LocalizationsDelegate<PickerLocalizations> {
  const DkPickerLocalizationsDelegate();

  static const DkPickerLocalizationsDelegate delegate =
      const DkPickerLocalizationsDelegate();

  @override
  bool isSupported(Locale locale) => ['en', 'zh', 'ko', 'it', 'ar','fr'].contains(locale.languageCode);

  @override
  Future<PickerLocalizations> load(Locale locale) {
    return SynchronousFuture<PickerLocalizations>(new PickerLocalizations(locale));
  }

  @override
  bool shouldReload(DkPickerLocalizationsDelegate old) => false;
}